<template>
  <h1></h1>
</template>
<script>
import common from "../../../../util/index";

export default {
  data() {
    return {};
  },

  async onShow() {
    try {
      let res                   = await common.methods.api("getLocation", {type: "gcj02"});
      let {latitude, longitude} = res;
      let key                   = "f2012b8c468e9a5c0274da3dd9568975";
      let keywords              = "医院";
      let url                   = `https://m.amap.com/around/?locations=${longitude},${latitude}&keywords=${keywords},,,&defaultIndex=1&defaultView=list&searchRadius=5000&key=${key}`;
      let res2                  = await this.$request.get(url);
      res2;
    }catch (e) {
      1;
    }
  },
  methods: {},
};
</script>
<style lang="scss">

</style>
